const mongoose = require('mongoose')

const ArticleSchema = mongoose.Schema({
    title: { type: String, require: true, index: true },
    category: { type: String, require: true, },
    html_body: { type: String, require: true, },
    text_body: { type: String, require: true, },
    isDelete: { type: Boolean, default: false },
    createTime: { type: Date, default: () => new Date(), },
})

const ArticleModel = mongoose.model('article', ArticleSchema)

module.exports = ArticleModel
